/**
 * 
 */
package com.ez.supervise.dao;

import java.util.List;
import java.util.Map;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.base.BaseDao;
import com.ez.supervise.model.biz.GoalCategory;

/**
 * @author searph.wang
 * @email searph.wang@gmail.com
 * @Created at 2009-7-22
 * 
 */
public interface GoalCategoryDao extends BaseDao {

    /**
     * @param page
     * @return
     */
    List findByPage(Page page);

    /**
     * @param page
     * @return
     */
    int findByCount(Page page);

    /**
     * @return
     */
    List findAll();

    /**
     * @param parentId
     * @return
     */
    List getChildrenById(Long parentId);

    /**
     * @param year
     * @return
     */
    List getRoots(int year);

    GoalCategory getNodeById(Long nodeId);

    List findValidYear();

    int countDetailByCategory(Long categoryId);

    void updatePercent(Long categoryId);

	List<GoalCategory> getChildrenById(Long parentId, Long applyOrgId);

	List findCategoryApply(Map conditions);

}
